
package com.hlkj.pay.app.merchant.ext.impl.kuaiqian.dto;
/*
 * Hlpay-Plus aggregate payment system.
 * Copyright (c) 2024-2025 Hlpay Team Copyright has the right of final interpretation.
 */

import com.fasterxml.jackson.core.type.TypeReference;
import com.hlkj.framework.common.util.json.JsonUtils;

import lombok.Data;

/**
 * @author HlpayTeam
 * @date 2024/11/21 10:48
 */
@Data
public class Bill99ResponseDto<T> {

    /**
     * memberCode : 10012946173 messageType : C1017 responseTextMessage : 成功 version
     * : 1.0.0 externalRefNumber : 1678775490900 responseCode : 0000
     */

    private HeadBean head;

    /**
     * bizResponseCode : 0000 amount : 111 province : 江苏 cardHolderName : 测试 city :
     * 南京 bizResponseMessage : 交易成功 branchName : 测试 bankName : 招商银行 pan :
     * 6214830258433696 reMark : 模拟交易成功 phoneNo : 15651035249
     */

    private T responseBody;

    @Data
    public static class HeadBean {

        private String memberCode;

        private String messageType;

        private String responseTextMessage;

        private String version;

        private String externalRefNumber;

        private String responseCode;

    }
    
    public static void main(String[] args) {
        String json="{\"memberCode\":\"\",\"messageType\":\"\",\"responseTextMessage\":\"A0000001: 请求报文格式有误\",\"version\":\"\",\"responseCode\":\"A0000001\"}";
        Bill99ResponseDto<Bill99SinglePaymentDto> bill99ResponseDto = JsonUtils.parseObject(json, new TypeReference<Bill99ResponseDto<Bill99SinglePaymentDto>>() {
        });
        System.out.println(JsonUtils.toJsonString(bill99ResponseDto));
        
        
        
    }

}
